Adds an onFailure callback to delegate error handling to the app#4
Open
jasonmit wants to merge 1 commit intoember-fastboot:masterfrom
Open
Adds an onFailure callback to delegate error handling to the app#4jasonmit wants to merge 1 commit intoember-fastboot:masterfrom
jasonmit wants to merge 1 commit intoember-fastboot:masterfrom
Conversation
c93e9f0 to
2dd539d
Compare
Contributor
|
Rather than introducing a new callback, I think (in the interests of Express ecosystem consistency) we should consider copying the |
Author
|
Sounds great, what should I default to? |
Contributor
|
|
|
we can probably close this now that #11 is merged. |
Author
|
I believe what I'm after is slightly different, I want to delegate error handling entirely to the caller. In #11 it looks like it res.send with html in some cases which might conflict with whatever the error handler is doing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds an
onFailurehook that can be passed into the fastboot middleware.The use case is apps may already have a way of handling errors. This allows someone to inject their own handler logic, which could be as simple as next(err) to allow their apps error handler to take over.